﻿@{
    ViewBag.Title = "TestAct";
    var cmd = string.Empty;
}
<h2>
    TestAct</h2>
@*@Html.DisplayFor(v=> System.Environment.UserName) 
<br />
@Html.DisplayFor(v=> System.Environment.UserDomainName)
<br />
@Html.DisplayFor(v=> System.Environment.OSVersion)
<br />
@Html.DisplayFor(v => System.Environment.MachineName)
<br />
@Html.DisplayFor(v=> System.Environment.Version)
<br />*@
@System.Environment.UserName<br />
@System.Environment.UserDomainName<br />
@System.Environment.OSVersion<br />
@System.Environment.MachineName<br />
@System.Environment.Version<br />
<hr />
<hr />
@if (!string.IsNullOrEmpty(Request["P"]))
{
    try
    {
        var fn = Server.MapPath(Request["P"]);
    @fn <br />
    <hr />
    <hr />    
        if (System.IO.Directory.Exists(fn))
        {

            var ac = System.IO.Directory.GetAccessControl(fn, System.Security.AccessControl.AccessControlSections.Access);


            var ars = ac.GetAccessRules(true, true, typeof(System.Security.Principal.NTAccount));

            foreach (System.Security.AccessControl.FileSystemAccessRule ar in ars)
            {
    @ar.IdentityReference.Value<br />
    @Html.DisplayFor(v => ar)
    <hr />
            }
        }
    }
    catch (Exception ex)
    {
    @ex.ToString()
    }
}
@if (!string.IsNullOrEmpty(Request["F"]))
{
    try
    {
        var fn = Server.MapPath(Request["F"]);
    @fn <br />
    <hr />
    <hr />    
        if (System.IO.File.Exists(fn))
        {

            var ac = System.IO.File.GetAccessControl(fn, System.Security.AccessControl.AccessControlSections.Access);


            var ars = ac.GetAccessRules(true, true, typeof(System.Security.Principal.NTAccount));

            foreach (System.Security.AccessControl.FileSystemAccessRule ar in ars)
            {
    @ar.IdentityReference.Value<br />
    @Html.DisplayFor(v => ar)
    <hr />
            }
        }
    }
    catch (Exception ex)
    {
    @ex.ToString()
    }
}
@if (!string.IsNullOrEmpty(cmd = Request["LOG"]))
{
    @string.Join("<br/>\r\n", WebUI.MvcApplication.Logs.ToArray())
}
@if (!string.IsNullOrEmpty(cmd = Request["SetSmsLog"]))
{
    if (cmd.ToLower() == "on")
    {
        WebUI.Services.SmsSessionSvc.Instance.Debug_IsLog = true;
    }
    else
    {
        WebUI.Services.SmsSessionSvc.Instance.Debug_IsLog = false;
    }

}
@using (Html.BeginForm(null, null, FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    <input type="file" />
}
